<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html>
<html lang="en">
<base href="<%=basePath%>">
	<meta charset="utf-8" />
	<!--下拉框 -->
	<link rel="stylesheet" href="front/css/normal.css">
	<link rel="stylesheet" href="static/css/finance.css" />
	<link rel="stylesheet" href="front/content/css/projectAdm.css">

</head>
<body >
<form style='margin:0 auto;'>
	<p class="con-title">报销详情</p>
    <table class="tableListBorder" >
        <colgroup>
            <col width="120">
            <col width="150">
            <col width="100">
            <col width="300">
            <col width="100">
            <col width="180">
            <col>
        </colgroup>
        <tbody >
            <tr>
                <td><span class="redStar">*</span>报销人姓名</td>
                <td><input type="text" value="${pd.USERNAME}" readonly="readonly" class="fieldEditable"></td>
                <td><span class="redStar">*</span>所属部门</td>
                <td>
                    <input type="text" value="${pd.department_name}" readonly="readonly" class="fieldEditable">
                </td>
                <td><span class="redStar">*</span>报销日期</td>
                <td>
                <c:if test="${pd.er_apply_time == null}"><input class="fieldEditable form_datetime date" type="text"  value="${pd.er_apply_time}" name="er_apply_time" ></c:if>
                <c:if test="${pd.er_apply_time != null && pd.er_apply_time != ''}"><fmt:formatDate value="${pd.er_apply_time}" pattern="yyyy-MM-dd HH:mm:ss"/></c:if>
                </td>
            </tr>
          <%--  <tr>
                <td><span class="redStar">*</span>报销原因</td>
                <td colspan="3" style="width: 2000px;">
                    <textarea name="er_reason" class="loanTextarea">${pd.er_reason}</textarea>
                </td>
           </tr> --%>
        </tbody>
    </table>
    <table class="tableListBorder2" id="tableList2">
        <colgroup>
            <col width="120">
            <col>
            <col width="100">
            <col width="140">
            <col width="80">
            <col width="50">
        </colgroup>
        <tbody>
            <tr>
                <td>支出分类</td>
                <td>用途说明</td>
                <td>费用金额</td>
                <td>对方单位</td>
                <td>经手人</td>
                <td>
                    <input type="button" value="+" class="createAdd fieldEditable">
                </td>
            </tr>
            <c:choose>
					<c:when test="${not empty varList}">
						<c:forEach items="${varList}" var="var" varStatus="vs">
				            <tr>
				                <td>
				                    <input type="text"  readonly="readonly" value="${var.outlay_type}" class="fieldEditable">
				                </td>
				                <td>
				                    <input type="text" readonly="readonly"  value="${var.purpose_explanation}" class="fieldEditable">
				                </td>
				                <td>
				                    <input type="number"   readonly="readonly"  value="${var.money}" class="fieldEditable">
				                </td>
				                <td>
				                    <input type="text" readonly="readonly"  value="${var.other_organisations}" class="fieldEditable">
				                </td>
				                <td>
				                    <input type="text"  readonly="readonly" value="${var.handled_by}"  class="fieldEditable">
				                </td>
				                <td>
				                    <input type="button" value="-" readonly="readonly" class="fieldEditable delet">
				                </td>
				            </tr>
						</c:forEach>
					</c:when>
			</c:choose>
        </tbody>
    </table>
    <table class="tableListBorder2" >
        <colgroup>
            <col width="120">
            <col>
            <col width="140">
            <col width="130">
        </colgroup>
        <tbody>
            <tr>
                <td>合计(大写)</td>
                <td><input  class='fieldEditable'value="${pd.capital}"  readonly="readonly" ></td>
                <td>
                   <input type="button" value="合计  ="  class="fieldEditable heji">
                </td>
                <td>
                    <input  class="fieldEditable heji" value="${pd.er_apply_amount}" readonly="readonly" >
                </td>
            </tr>
        </tbody>
    </table>
    <p style="width:100%;line-height: 30px;border-bottom: 1px solid #d9d9d9">* 填单人根据规定，提交给主管审批。在主管审批或上级审批通过后，请打印本电子单据并且粘贴上原始票据，传递给财务处理。</p>
    <c:if test="${pd.er_invoice  !=null && pd.er_invoice !=''}">
        <p>
                        点击下载：<a class="btn btn-mini btn-primary" href="192.168.198.251:8080/${pd.er_invoice}">${pd.name_invoice}</a>
        </p>
    </c:if>
  </form>	
		<p class="btn-box">
	        <button onclick="javascript:history.back(-1);">返回</button>
	    </p>
	
	<!-- 下拉框 -->
	<script src="front/js/chosen.jquery.js"></script>
	<!-- 日历插件 -->
	<script src="front/js/bootstrap-datetimepicker.js"></script>
	<script src="front/js/jquery.tips.js"></script>
	<script src="front/js/index.js"></script>
</body>
</html>